<?php

use Illuminate\Database\Seeder;
use App\Models\AssessmentQuestion;

class AssessmentQuestionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $questions = [
            // 破冰力相关问题
            [
                'question_text' => '在一个陌生人很多的聚会上，你通常会：',
                'question_type' => 'breaking_ice',
                'options' => json_encode([
                    'A' => '主动找人聊天，介绍自己',
                    'B' => '等别人来和我说话',
                    'C' => '找个熟人待在一起',
                    'D' => '尽快找借口离开'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 5, 'B' => 2, 'C' => 3, 'D' => 1
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '当对话出现冷场时，你会：',
                'question_type' => 'breaking_ice',
                'options' => json_encode([
                    'A' => '立即找新话题继续聊',
                    'B' => '等对方先开口',
                    'C' => '说些客套话填补沉默',
                    'D' => '感到尴尬，想要逃避'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 5, 'B' => 2, 'C' => 3, 'D' => 1
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '你认为开始一段对话最好的方式是：',
                'question_type' => 'breaking_ice',
                'options' => json_encode([
                    'A' => '直接询问对方的工作或兴趣',
                    'B' => '从当下的环境或活动开始聊',
                    'C' => '先自我介绍再问对方',
                    'D' => '等对方给出明确的交流信号'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 3, 'B' => 5, 'C' => 4, 'D' => 1
                ]),
                'is_active' => true,
            ],

            // 共情度相关问题
            [
                'question_text' => '当朋友向你抱怨工作压力时，你通常会：',
                'question_type' => 'empathy',
                'options' => json_encode([
                    'A' => '立即给出解决建议',
                    'B' => '先倾听，理解他们的感受',
                    'C' => '分享自己类似的经历',
                    'D' => '转移话题让他们开心起来'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 2, 'B' => 5, 'C' => 3, 'D' => 1
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '看到别人情绪低落时，你的第一反应是：',
                'question_type' => 'empathy',
                'options' => json_encode([
                    'A' => '询问发生了什么事',
                    'B' => '给他们一个拥抱或安慰',
                    'C' => '静静陪伴，等他们主动说',
                    'D' => '假装没注意到，避免尴尬'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 3, 'B' => 4, 'C' => 5, 'D' => 1
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '你认为理解别人最重要的是：',
                'question_type' => 'empathy',
                'options' => json_encode([
                    'A' => '听懂他们说的话',
                    'B' => '感受他们的情绪',
                    'C' => '理解他们的处境',
                    'D' => '知道他们想要什么'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 2, 'B' => 5, 'C' => 4, 'D' => 3
                ]),
                'is_active' => true,
            ],

            // 推进技巧相关问题
            [
                'question_text' => '在深入了解一个人时，你会：',
                'question_type' => 'conversation_flow',
                'options' => json_encode([
                    'A' => '直接问比较私人的问题',
                    'B' => '通过开放性问题逐步深入',
                    'C' => '分享自己的经历引导对方',
                    'D' => '等对方主动分享更多'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 1, 'B' => 5, 'C' => 4, 'D' => 2
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '当你想要推进关系时，你会：',
                'question_type' => 'conversation_flow',
                'options' => json_encode([
                    'A' => '直接表达自己的想法',
                    'B' => '创造更多相处的机会',
                    'C' => '通过共同兴趣建立联系',
                    'D' => '等待合适的时机'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 3, 'B' => 5, 'C' => 4, 'D' => 2
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '你认为维持对话流畅最重要的是：',
                'question_type' => 'conversation_flow',
                'options' => json_encode([
                    'A' => '不断提出新问题',
                    'B' => '认真回应对方的话',
                    'C' => '找到共同话题',
                    'D' => '保持轻松的氛围'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 2, 'B' => 5, 'C' => 4, 'D' => 3
                ]),
                'is_active' => true,
            ],
            [
                'question_text' => '面对不同性格的人，你会：',
                'question_type' => 'conversation_flow',
                'options' => json_encode([
                    'A' => '用同样的方式对待所有人',
                    'B' => '观察并调整自己的沟通方式',
                    'C' => '只和性格相似的人深入交流',
                    'D' => '避免和性格差异大的人交流'
                ]),
                'scoring_rules' => json_encode([
                    'A' => 2, 'B' => 5, 'C' => 3, 'D' => 1
                ]),
                'is_active' => true,
            ],
        ];

        foreach ($questions as $question) {
            AssessmentQuestion::create($question);
        }
    }
}